package com.IntelligentCommunity.dataAccess.controller;


import com.IntelligentCommunity.common.core.domain.R;
import com.IntelligentCommunity.community.domain.RealDoor;
import com.IntelligentCommunity.dataAccess.domain.FaceCapture;
import com.IntelligentCommunity.dataAccess.domain.VehicleCapture;
import com.IntelligentCommunity.dataAccess.service.ICaptureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：ZHP
 * @Package：com.IntelligentCommunity.controller
 * @Project：IntelligentCommunity
 * @name：FaceCaptureController
 * @Date：2024/7/19 00:53
 * @Filename：CaptureController 抓拍控制层
 */
@RestController
@RequestMapping("/capture")
public class CaptureController {
    @Autowired
    private ICaptureService captureService;


    @PostMapping("/faceBs64")
    public R faceCapture(@RequestBody FaceCapture faceCapture){
        captureService.faceCapture(faceCapture);
        return R.ok();
    }
    @PostMapping("/faceImgAsd")
    public R faceCaptureAsd(@RequestBody FaceCapture faceCapture){
        captureService.faceCaptureAsd(faceCapture);
        return R.ok();
    }
    @PostMapping("/car")
    public R carCapture(@RequestBody VehicleCapture vehicleCapture){
        captureService.carCapture(vehicleCapture);
        return R.ok();
    }
    @PostMapping("/door")
    public R doorCapture(@RequestBody RealDoor realDoor){
        captureService.doorCapture(realDoor);
        return R.ok();
    }
}
